<?php
namespace App\Http\Controllers\Api;
use App\Services\Aliyun\Sms\AliYunSmsServices;
use Illuminate\Http\Request;


class SendController
{
    /**
     * 发送阿里云验证码
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function sendSms(Request $request)
    {
        $phone = $request->phone;
        if (empty($phone)) {
            return errBack('缺少手机号！');
        }
        $code = randomnumber();//随机6位数字
        //阿里云短信
        $res= AliYunSmsServices::sendSmsCode($phone,$code);
        return okBack('还没有短信的配置信息', $res);
    }


}